<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>使用boxshadow实现dialog效果</title>
  <style>
    .spectiveBlur {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 220px;
      height: 100px;
      line-height: 160px;
      transform: translate(-50%, -50%);
      border-radius: 10px;
      overflow: hidden;
      background: #E91E63;
      color: #fff;
      font-size: 200%;
      text-align: center;
      cursor: pointer;
      transition: transform .2s;
    }

    .spectiveBlur:hover {
      box-shadow: 0 0 0 1920px rgba(0, 0, 0, .7);
      transform: translate(-50%, -50%) scale(1.2);
    }
  </style>
</head>

<body>
  <div class="spectiveBlur"></div>
</body>

</html>